	
/****** Object:  Stored Procedure OfficesInsert    Script Date: Friday, March 07, 2008 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[spOfficesInsert]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [spOfficesInsert]
GO

	
	

/******************************************************************************
**		File: 
**		Name: spOfficesInsert
**		Desc: 
**
**		Return values:
** 
**		Called by:   
**              
**		Parameters:
**		Input							Output
**     ----------							-----------
**
**		Auth: CodeSmith
**		Date: 3/7/2008 11:26:45 AM
*******************************************************************************
**		Change History
*******************************************************************************
**		Date:		Author:				Description:
**		--------		--------				-------------------------------------------
**    
*******************************************************************************/
CREATE PROCEDURE spOfficesInsert
	@OfficeName nvarchar(100),
	@OfficeCode varchar(10),
	@NotifyEmailEnable bit,
	@SortOrder int,
	@OfficeID int output
AS

INSERT INTO [Offices] 
(
	[OfficeName],
	[OfficeCode],
	[NotifyEmailEnable],
	[SortOrder]
) 
VALUES 
(
	@OfficeName,
	@OfficeCode,
	@NotifyEmailEnable,
	@SortOrder
)

SELECT @OfficeID = @@IDENTITY

GO
	
